-- http://www.phpmyadmin.net
--




--
-- Database: `mig_db`
--

-- --------------------------------------------------------

--
-- Table structure for table `company_retail`
--

CREATE TABLE IF NOT EXISTS `company_retail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_id` int(11) DEFAULT NULL,
  `retail_id` int(11) DEFAULT NULL,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `username` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime DEFAULT NULL,
  `archived` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C616FA60979B1AD6` (`company_id`),
  KEY `IDX_C616FA6070A3840` (`retail_id`)
) ENGINE=InnoDB  EFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;

--
-- Dumping data for table `company_retail`
--

-- --------------------------------------------------------

--
-- Table structure for table `retail`
--

CREATE TABLE IF NOT EXISTS `retail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `auth_token` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `requests` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_FB899E155E237E06` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=9 ;

--
-- Dumping data for table `retail`
--

INSERT INTO `retail` (`id`, `name`, `auth_token`, `requests`, `created`, `updated`) VALUES
(1, 'Car Trader', '8deba4865385c926b093b676ee39da57853a5c22', 0, '2013-09-04 10:59:41', NULL),
(2, 'Auto Trader', 'fgo09t083rht2tmpwgj45jkf234rt2it4j034r9q', 0, '2013-09-04 10:59:41', NULL),
(3, 'Car Find', 'fskf47hliefjkhflir30rkijjchvnnvlaisd3397', 0, '2013-09-04 10:59:41', NULL),
(4, 'Cars', 'anmbv8b877r774423kdmvosuiefh49u745899387', 0, '2013-09-04 10:59:41', NULL),
(5, 'Trade Exchange', '7789qewejksd32323sxzxdcxfsonjuijusuwd354', 0, '2013-09-04 10:59:41', NULL),
(6, 'Imperial Select', '6a8af51331afa552de7199d534331a45dhwo2mcx', 0, '2013-09-04 10:59:41', NULL),
(7, 'Tavcor', '7d0cf48a567bae86fc03425c8ffa67d1d16f183d', 0, '2013-09-04 10:59:41', NULL),
(8, 'Hyundai South Africa', '50e8a91f7b7a6713efa341676756025a107e219d', 0, '2013-09-04 10:59:41', NULL);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `company_retail`
--
ALTER TABLE `company_retail`
  ADD CONSTRAINT `FK_C616FA6070A3840` FOREIGN KEY (`retail_id`) REFERENCES `retail` (`id`),
  ADD CONSTRAINT `FK_C616FA60979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`);

